package pasientlosjen.DAO;

import java.util.List;

public interface GenericDao<T, PK> {

	/** Persist the newInstance object into database */
	boolean create(T newInstance);

	/**
	 * Retrieve an object that was previously persisted to the database using
	 * the indicated id as primary key
	 */
	T read(Class<T> type, PK id);

	/** Save changes made to a persistent object. */
	boolean update(T transientObject);

	/** Remove an object from persistent storage in the database */
	boolean delete(T persistentObject);

	public List<T> readAll(Class<?> type);

}
